macos: fix scale on macOS 12 beta
authorChristian Hergert <chergert@redhat.com>
Thu, 14 Oct 2021 21:46:30 +0000 (14:46 -0700)
committerChristian Hergert <chergert@redhat.com>
Thu, 14 Oct 2021 21:46:30 +0000 (14:46 -0700)
commite3ef21f77033a7a92d63e55c3dc7c987faa4fcf0
treeaab85f06f2b15de1c452291b7d6a792c38242abc
parenta7ef4c75ea9c4f6605a3ae4c033150687d9eb08a
macos: fix scale on macOS 12 beta

This is a port of the fix in the quartz backend to the new macOS backend.

From the original commit:

In macOS-12.sdk CGContextConverSizeToDeviceSpace returns a negative
height and passing that to CGContextScaleCTM in turn causes the cairo
surface to draw outside the window where it can't be seen. Passing the
absolute values of the scale factors fixes the display on macOS 12 without
affecting earlier macOS versions.
gdk/macos/gdkmacossurface.c